package com.ahccc.codegenerator;

import com.ahccc.codegenerator.config.GenerateConfig;
import com.ahccc.common.util.SpringUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@Controller
@SpringBootApplication(scanBasePackages = {"com.ahccc.framework.mybatis", "com.ahccc.codegenerator"})
@EnableTransactionManagement
@EnableCaching
//@ComponentScan(basePackages={"com.ahccc.iot.device.core.config"})
@EnableConfigurationProperties({GenerateConfig.class})
public class Application {

	@Bean
	public SpringUtil getSpringUtil() {
		return new SpringUtil();
	}

    public static void main(String[] args) {
		SpringApplication.run(Application.class, args);
	}
}
